package com.example.question.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 题目实体类
 * @author 颜殿
 */
@Data
@TableName("interview_question")
public class Question implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    
    /** 题目标题 */
    @TableField(value = "title")
    private String title;
    
    /** 题目描述 */
    @TableField(value = "description")
    private String description;
    
    /** 难度级别 */
    @TableField(value = "difficulty")
    private Difficulty difficulty;
    
    /** 状态 */
    @TableField(value = "status")
    private Integer status;

    /** 题目集ID */
    @TableField(value = "problemset_id")
    private Integer problemsetId;

    /** 标签 */
    @TableField(value = "tags")
    private String tags;
    
    /** 预计回答时间 */
    @TableField(value = "expected_time")
    private Integer expectedTime;
    
    /** 最高分值 */
    @TableField(value = "max_score")
    private Integer maxScore;
    
    /** 题目答案 */
    @TableField(value = "answer")
    private String answer;
    
    /** 创建时间 */
    @TableField(value = "created_at")
    private LocalDateTime createdAt;
    
    /** 更新时间 */
    @TableField(value = "updated_at")
    private LocalDateTime updatedAt;

    /** 难度枚举类型 */
    public enum Difficulty {
        /** 题目难度 */
        简单, 中等, 困难
    }

} 